package com.example.demo.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface commodityRepository extends JpaRepository<commodity, Integer> {
    List<commodity> findByCommodityName(String commodityName);

    List<commodity> findByUserName(String userName);

    List<commodity> findAll();

    commodity findByCommodityId(long id);

    void deleteByCommodityId(long commodityId);
}
